<script type="text/javascript"><!--//--><![CDATA[//><!--
	function checkname(name) {
		$('#usermsg').html('检测中，请稍等...');
		$('#usermsg').css('color','Blue');
		jQuery.ajax({
			type: "GET",
			url: "register.php",
			data: {action:'checkreg',name:name},
			dataType: "json",
			cache: false,
			success: function(json){
				var reason;
				if (json.result){
					switch (json.result){
						case 1:
							reason= '网站禁止注册或您已注册' ;
							break;
						case 2:
							reason= '此用户名已被注册' ;
							break;
						case 3:
							reason= '此用户名禁止注册' ;
							break;
						case 4:
							reason= '用户名中包含非法字符' ;
							break;
						case 5:
							reason= '用户名长度非法' ;
							break;
					}
					$('#usermsg').html(reason);
					$('#usermsg').css('color','red');
				}else{
					$('#usermsg').html('该用户名可用');
					$('#usermsg').css('color','green');
				}
			}
		});
	}
	function checkpswd(val) {
		if($('#pswd').val()<>val) {
			$('#pswdmsg2').html('两次输入的密码不一样');
			$('#pswdmsg2').css('color','Red');
		}else {
			$('#pswdmsg2').html('两次输入一致');
			$('#pswdmsg2').css('color','Green');
		}
	}
	function checkemail(val) {
		$('#emailmsg').html('检测中，请稍等...');
		$('#emailmsg').css('color','Blue');
		jQuery.ajax({
			type: "GET",
			url: "register.php",
			data: {action:'checkreg',email:val},
			dataType: "json",
			cache: false,
			success: function(json){
				var reason;
				if (json.result){
					switch (json.result){
						case 1:
							reason= '该邮箱格式暂时不被接受' ;
							break;
						case 2:
							reason= '此邮箱已被注册' ;
							break;
					}
					$('#emailmsg').html(reason);
					$('#emailmsg').css('color','red');
				}else{
					$('#emailmsg').html('该用户名可用');
					$('#emailmsg').css('color','green');
				}
			}
		});
	}
//--><!]]></script>
<div id="luf_reg_top">注册新用户</div>
<div id="luf_reg_step">注册步骤：1.回答10个问题&nbsp;&gt;&nbsp;<span class="luf_reg_current">2.填写信息</span>&nbsp;&gt;&nbsp;3.收电子邮件,注册成功</div>
<form action="register.php" method="post">
<input type='hidden' name='action' value='reg3' />
<input type='hidden' name='ccode' value='{C_code}' />
<div class="luf_reg_title">第二步:请填写以下注册信息。</div>
<ul id="luf_reg_info">
	<li><label>用户名: </label><input type="text" maxlength="20" name="name" id="name" onblur="javascript:checkname(this.value);" /><span>{minlen}-{maxlen}个小写英文或数字，用于每次登录。</span><span id="usermsg"></span></li>
	<li><label>E-mail: </label><input type="text" maxlength="32" name="email" id="email" onblur="javascript:checkemail(this.value);" /><span>用于激活用户功能以及找回密码，一个Email只能注册一次，非常重要，请认真填写。</span><span id="emailmsg"></span></li>
	<li><label>密码: </label><input type="password" maxlength="75" name="pswd" id="pswd" /><span>6-20个字符。</span><span id="pswdmsg"></span></li>
	<li><label>重复密码: </label><input type="password" maxlength="75" id="pswd2" onblur="javascript:checkpswd(this.value);" /><span>密码请保持一致。</span><span id="pswdmsg2"></span></li>
	<li><label>密保问题: </label><input type="text" name="luf_reg_pswdq" /><span>此处输入自定义的密保问题，当发生意外或找回密码时用。</span></li>
	<li><label>密保答案: </label><input type="text" name="luf_reg_pwsda" /><span>此处输入自定义的密保答案，并请牢记。</span></li>
	<!-- IF C_loghashenable --><li class="luf_reg_vcode"><label>验证码: </label><input type="text" size="31" name="secode" title="请在该框中输入右图显示的字符" /><img class="luf_vimg" src="download.php?action=gethashimg" alt="请在左框中输入该图显示的字符" align="absmiddle" style="cursor: pointer;" onclick="javascript:this.src='download.php?action=gethashimg&amp;xx='+Math.random();" /></li><!-- ENDIF -->
	<li class="luf_reg_agreement">
		<textarea>{C_readme}</textarea>
	</li>
	<li class="luf_reg_agree"><input type="checkbox" id='agree' onclick="javascript:$$('tsubmit').disabled= this.checked ? false:true;"><span><label for='agree' style='width:150px;'>阅读并同意《使用协议》</label></span></li>
	<li class="luf_reg_submit"><input type="submit" name="luf_reg_submit" value="下一步" id='tsubmit' disabled /></li>
</ul>
</form>
